package com.espirit.eap.manager;

import javax.persistence.Entity;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.espirit.EntityMapping;
import com.googlecode.cswish.model.Saas;

@Entity
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Dictionary extends EntityMapping implements Saas {

	public final static String TYPE_SYSTEM = "_SYS_";
	
	private String name;
	
	private String value;
	
	private String description;
	
	private String type;

	public Dictionary() {
	}
	
	public Dictionary(String name, String value, String type) {
		super();
		this.name = name;
		this.value = value;
		this.type = type;
	}
	
	public Dictionary(String name, String value) {
		this(name, value, TYPE_SYSTEM);
	}
	
	public Dictionary(String name, String value, String description, String type) {
		this(name, value, type);
		this.description = description;
	}
	
	private Integer sid;
	public Integer getSid() {
		return sid;
	}

	public void setSid(Integer sid) {
		this.sid = sid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
}
